﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using SageKing.Database.Contracts;

namespace SageKing.Database.Service;

public abstract class BaseService<TEntity, Tk> : IBaseService<TEntity, Tk>
where TEntity : IEntityBase<Tk>, new()
{
    public virtual Task<bool> Add(TEntity entity)
    {
        throw new NotImplementedException();
    }

    public virtual Task<bool> Add(IEnumerable<TEntity> entity)
    {
        throw new NotImplementedException();
    }

    public virtual Task<bool> Add(IList<TEntity> entitys)
    {
        throw new NotImplementedException();
    }

    public abstract Task<TEntity> AddReturnEntityAsync(TEntity entity);

    public virtual Task<Tk> AddReturnId(TEntity entity, int type = 0)
    {
        throw new NotImplementedException();
    }

    public virtual Task<int> CountAsync(Expression<Func<TEntity, bool>> whereFunc)
    {
        throw new NotImplementedException();
    }

    public virtual Task<bool> Delete(Tk id)
    {
        throw new NotImplementedException();
    }

    public virtual Task<TEntity> GetDetail(Tk id)
    {
        throw new NotImplementedException();
    }

    public virtual Task<List<TEntity>> GetList()
    {
        throw new NotImplementedException();
    }

    public virtual Task<List<TEntity>> GetList(Expression<Func<TEntity, bool>> whereFunc)
    {
        throw new NotImplementedException();
    }

    public virtual Task<List<TEntity>> GetList(Expression<Func<TEntity, bool>> whereFunc, Expression<Func<TEntity, object>> orderby, bool orderByType = true)
    {
        throw new NotImplementedException();
    }

    public virtual Task<PageBase<TEntity>> GetPageAsync(PageBaseInput input)
    {
        throw new NotImplementedException();
    }

    public virtual Task<PageBase<TEntity>> GetPage(PageBaseInput input, Expression<Func<TEntity, object>> orderby, bool orderByAsc = true)
    {
        throw new NotImplementedException();
    }

    public virtual Task<PageBase<TEntity>> GetPage(PageBaseInput input, List<(bool, Expression<Func<TEntity, bool>>)> whereIf, Expression<Func<TEntity, object>> orderByColumns, bool orderByAsc = true)
    {
        throw new NotImplementedException();
    }

    public abstract Task<int> Update(TEntity entity);

    public virtual Task<int> Update(TEntity entity, Expression<Func<TEntity, object>> updateColumns)
    {
        throw new NotImplementedException();
    }

    public virtual Task<int> Update(Expression<Func<TEntity, bool>> wherefunc, Expression<Func<TEntity, TEntity>> updateColumns)
    {
        throw new NotImplementedException();
    }

    public abstract Task<int> UpdateWithOptLock(TEntity entity);

    public virtual Task<int> UpdateWithOptLock(TEntity entity, Expression<Func<TEntity, object>> updateColumns)
    {
        throw new NotImplementedException();
    }
}
